{include file=member.header.html}
<script type="text/javascript">
$(function(){
           $("input[name='cancel_reason']").click(function(){
            if ($(this).attr('flag') == 'other_reason')
            {
                $('#other_reason').show();
            }
            else
            {
                $('#other_reason').hide();
            }
        });
		$('.close-reson li').click(function(){
			$('.close-reson li .masker').removeClass('active');
			$(this).find('.masker').addClass('active');
		})
});
function submitDdata()
{
		var remark_input = $('#other_reason_input').val();
		var cancel_reason = $('[name="cancel_reason"]').val();
		var url = REAL_SITE_URL+"/index.php?app=seller_order&act=cancel_order&order_id={$order_id}";
		$.post(url,{remark:remark_input,cancel_reason:cancel_reason},function(data){
			if(data == true){
				msg("{$lang.handle_ok}");
				setTimeout(function(){
					window.location.href=REAL_SITE_URL+"/index.php?app=seller_order";
				},1500);
			}  
		},"json");
}
</script>
<div id="page-buyer-order">
	<ul class="close-reson">
			<li class="relative" ><label><input type="radio" checked name="cancel_reason" id="d1"  value="{$lang.cancel_reason1}" /><b class="masker absolute"></b><span>{$lang.cancel_reason1}</span></label></li>
			<li class="relative" ><label><input type="radio" name="cancel_reason" id="d2"  value="{$lang.cancel_reason2}" /><b class="masker absolute"></b><span>{$lang.cancel_reason2}</span></label></li>
			<li class="relative" ><label><input type="radio" name="cancel_reason" id="d3"  value="{$lang.cancel_reason3}" /><b class="masker absolute"></b><span>{$lang.cancel_reason3}</span></label></li>
			<li class="relative"><label><input type="radio" name="cancel_reason" flag="other_reason" id="d4"  value="{$lang.other_reason}" /><b class="masker absolute"></b><span>{$lang.other_reason}</span></label></li>
			<li id="other_reason" style="display:none"><textarea class="text" id="other_reason_input" name="remark"></textarea></li>
			<div class="btn"><input type="button" onclick="submitDdata();" id="confirm_button" class="btn1" value="{$lang.confirm}" /></div>
	</ul>
</div>